package me.jessyan.mvparms.demo.di.module.coupon;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.coupon.MyCouponContract;
import me.jessyan.mvparms.demo.mvp.model.coupon.MyCouponModel;


@Module
public class MyCouponModule {
    private MyCouponContract.View view;

    /**
     * 构建MyCouponModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MyCouponModule(MyCouponContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MyCouponContract.View provideMyCouponView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MyCouponContract.Model provideMyCouponModel(MyCouponModel model) {
        return model;
    }
}